<?xml version="1.0" encoding="utf-8"?>
<schema xmlns:tns="http://atrium.bmc.com/2009/01/query/types" xmlns:common="http://atrium.bmc.com/2009/01/common" targetNamespace="http://atrium.bmc.com/2009/01/query/types" xmlns="http://www.w3.org/2001/XMLSchema">
  <import schemaLocation="atrium_common_200901.xsd" namespace="http://atrium.bmc.com/2009/01/common" />
  <complexType name="QueryResultGraph">
    <sequence>
      <element minOccurs="0" maxOccurs="unbounded" name="list" type="common:InstanceInfoOutList" />
    </sequence>
  </complexType>
  <simpleType name="QueryQualifierOperation">
    <restriction base="string">
      <enumeration value="EQUAL" />
      <enumeration value="GREATER" />
      <enumeration value="GREATER_EQUAL" />
      <enumeration value="LESS" />
      <enumeration value="LESS_EQUAL" />
      <enumeration value="NOT_EQUAL" />
      <enumeration value="LIKE" />
    </restriction>
  </simpleType>
  <simpleType name="QueryArithOpType">
    <restriction base="string">
      <enumeration value="ADD" />
      <enumeration value="SUBTRACT" />
      <enumeration value="MULTIPLY" />
      <enumeration value="DIVIDE" />
      <enumeration value="MODULO" />
      <enumeration value="NEGATE" />
    </restriction>
  </simpleType>
  <simpleType name="QueryQualifierSetOpOperation">
    <restriction base="string">
      <enumeration value="IN" />
      <enumeration value="NOT_IN" />
    </restriction>
  </simpleType>
  <complexType name="QueryQualifierValueTypeArithExpr">
    <sequence>
      <element name="leftOperand" type="tns:QueryQualifierValue" />
      <element name="operation" type="tns:QueryArithOpType" />
      <element name="rightOperand" type="tns:QueryQualifierValue" />
    </sequence>
  </complexType>
  <complexType name="QueryQualifierValueTypeAttributeName">
    <sequence>
      <element name="attributeName" type="string" />
      <element name="classAlias" type="string" />
    </sequence>
  </complexType>
  <complexType name="QueryQualifierValueTypeValue">
    <sequence>
      <element name="value" type="common:Value" />
    </sequence>
  </complexType>
  <complexType name="QueryQualifierValue">
    <choice>
      <element name="queryQualifierValueTypeArithExpr" type="tns:QueryQualifierValueTypeArithExpr" />
      <element name="queryQualifierValueTypeAttributeName" type="tns:QueryQualifierValueTypeAttributeName" />
      <element name="queryQualifierValueTypeValue" type="tns:QueryQualifierValueTypeValue" />
    </choice>
  </complexType>
  <complexType name="QueryQualifierAndOr">
    <sequence>
      <element name="operandLeft" type="tns:QueryQualifier" />
      <element name="operandRight" type="tns:QueryQualifier" />
    </sequence>
  </complexType>
  <complexType name="QueryQualifierOpAnd">
    <complexContent mixed="false">
      <extension base="tns:QueryQualifierAndOr" />
    </complexContent>
  </complexType>
  <complexType name="QueryQualifierOpNot">
    <sequence>
      <element name="notQual" type="tns:QueryQualifier" />
    </sequence>
  </complexType>
  <complexType name="QueryQualifierOpOr">
    <complexContent mixed="false">
      <extension base="tns:QueryQualifierAndOr" />
    </complexContent>
  </complexType>
  <complexType name="NestedQuery">
    <sequence>
      <element name="queryObjects" type="tns:QueryObjectList" />
      <element name="queryObjectsOptional" nillable="true" type="tns:QueryObjectList" />
      <element name="queryObjectSelector" type="tns:QueryObjectSelector" />
    </sequence>
  </complexType>
  <complexType name="QueryQualifierValueSetTypeQuery">
    <sequence>
      <element name="query" type="tns:NestedQuery" />
    </sequence>
  </complexType>
  <complexType name="QueryQualifierValueSetTypeValueSet">
    <sequence>
      <element name="valueSet" type="common:ValueList" />
    </sequence>
  </complexType>
  <complexType name="QueryQualifierValueSetSel">
    <choice>
      <element name="queryQualifierValueSetTypeQuery" type="tns:QueryQualifierValueSetTypeQuery" />
      <element name="queryQualifierValueSetTypeValueSet" type="tns:QueryQualifierValueSetTypeValueSet" />
    </choice>
  </complexType>
  <complexType name="QueryQualifierSetOp">
    <sequence>
      <element name="attribute" type="string" />
      <element name="operation" type="tns:QueryQualifierSetOpOperation" />
      <element name="operandRight" type="tns:QueryQualifierValueSetSel" />
    </sequence>
  </complexType>
  <complexType name="QueryQualifierSimpleOp">
    <sequence>
      <element name="attribute" type="string" />
      <element name="operation" type="tns:QueryQualifierOperation" />
      <element name="operandRight" type="tns:QueryQualifierValue" />
    </sequence>
  </complexType>
  <complexType name="QueryQualifier">
    <choice>
      <element name="queryQualifierOpAnd" type="tns:QueryQualifierOpAnd" />
      <element name="queryQualifierOpNot" type="tns:QueryQualifierOpNot" />
      <element name="queryQualifierOpOr" type="tns:QueryQualifierOpOr" />
      <element name="queryQualifierSetOp" type="tns:QueryQualifierSetOp" />
      <element name="queryQualifierSimpleOp" type="tns:QueryQualifierSimpleOp" />
    </choice>
  </complexType>
  <complexType name="QueryObject">
    <sequence>
      <element name="alias" type="string" />
      <element name="classNameId" type="common:ClassNameId" />
      <element name="qualification" nillable="true" type="tns:QueryQualifier" />
    </sequence>
  </complexType>
  <complexType name="QueryObjectRegular">
    <complexContent mixed="false">
      <extension base="tns:QueryObject" />
    </complexContent>
  </complexType>
  <simpleType name="RelationshipDirection">
    <restriction base="string">
      <enumeration value="IN" />
      <enumeration value="OUT" />
    </restriction>
  </simpleType>
  <complexType name="QueryObjectRelationship">
    <complexContent mixed="false">
      <extension base="tns:QueryObject">
        <sequence>
          <element name="direction" type="tns:RelationshipDirection" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="QueryObjectSel">
    <choice>
      <element name="queryObjectRegular" type="tns:QueryObjectRegular" />
      <element name="queryObjectRelationship" type="tns:QueryObjectRelationship" />
    </choice>
  </complexType>
  <complexType name="QueryObjectList">
    <sequence>
      <element minOccurs="1" maxOccurs="unbounded" name="list" type="tns:QueryObjectSel" />
    </sequence>
  </complexType>
  <simpleType name="QueryObjectSelectorFlag">
    <restriction base="string">
      <enumeration value="DEFAULT_NONE" />
      <enumeration value="DEFAULT_NONHIDDEN" />
      <enumeration value="DEFAULT_ALL" />
    </restriction>
  </simpleType>
  <complexType name="QueryObjectSelector">
    <sequence>
      <element name="alias" type="string" />
      <element minOccurs="1" maxOccurs="unbounded" name="attributes" type="string" />
    </sequence>
  </complexType>
  <complexType name="QueryObjectSelectorList">
    <sequence>
      <element name="flags" type="tns:QueryObjectSelectorFlag" />
      <element minOccurs="1" maxOccurs="unbounded" name="list" type="tns:QueryObjectSelector" />
    </sequence>
  </complexType>
  <complexType name="QueryInput">
    <sequence>
      <element name="datasetId" type="string" />
      <element name="datasetMask" type="common:GetMask" />
      <element name="queryObjects" type="tns:QueryObjectList" />
      <element name="queryObjectSelectorList" type="tns:QueryObjectSelectorList" />
    </sequence>
  </complexType>
  <complexType name="QueryInput2">
    <complexContent mixed="false">
      <extension base="tns:QueryInput">
        <sequence>
          <element name="queryObjectsOptional" nillable="true" type="tns:QueryObjectList" />
          <element name="firstRetrieve" type="int" />
          <element name="maxRetrieve" type="int" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="Query">
    <choice>
      <element name="queryChoice1" type="tns:QueryInput" />
      <element name="queryChoice2" type="tns:QueryInput2" />
    </choice>
  </complexType>
  <simpleType name="QueryExecuteOption">
    <restriction base="string">
      <enumeration value="EXECUTE_ONLY" />
      <enumeration value="SAVE_ONLY" />
      <enumeration value="EXECUTE_AND_SAVE" />
    </restriction>
  </simpleType>
  <complexType name="SavedQueryInfo">
    <sequence>
      <element name="description" nillable="true" type="string" />
      <element name="instanceId" type="string" />
    </sequence>
  </complexType>
  <complexType name="SavedQueryData">
    <complexContent mixed="false">
      <extension base="tns:SavedQueryInfo">
        <sequence>
          <element name="createdBy" type="string" />
          <element name="createDate" type="dateTime" />
          <element name="queryByPathXMLText" type="string" />
          <element name="queryByPathObject" type="tns:QueryByPathInput" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="SavedQueryInfoList">
    <sequence>
      <element minOccurs="0" maxOccurs="unbounded" name="list" type="tns:SavedQueryInfo" />
    </sequence>
  </complexType>
  <complexType name="QueryByPathInput">
    <sequence>
      <element name="query" type="tns:Query" />
      <element name="queryDescription" type="string" />
    </sequence>
  </complexType>
  <complexType name="QueryByPathXMLInput">
    <sequence>
      <element name="queryXML" type="string" />
      <element name="queryDescription" type="string" />
    </sequence>
  </complexType>
  <element name="QueryByPath">
    <complexType>
      <sequence>
        <element name="loginInfo" nillable="true" type="common:LoginInfo" />
        <element name="input" type="tns:QueryByPathInput" />
        <element name="executeOption" type="tns:QueryExecuteOption" />
        <element name="extensions" nillable="true" type="common:ExtensionList" />
      </sequence>
    </complexType>
  </element>
  <element name="QueryByPathXML">
    <complexType>
      <sequence>
        <element name="loginInfo" nillable="true" type="common:LoginInfo" />
        <element name="input" type="tns:QueryByPathXMLInput" />
        <element name="executeOption" type="tns:QueryExecuteOption" />
        <element name="extensions" nillable="true" type="common:ExtensionList" />
      </sequence>
    </complexType>
  </element>
  <element name="QueryByPathOutput">
    <complexType>
      <sequence>
        <element name="queryResult" type="tns:QueryResultGraph" />
        <element name="status" type="common:StatusList" />
        <element name="extensions" nillable="true" type="common:ExtensionList" />
      </sequence>
    </complexType>
  </element>
  <element name="DeleteSavedQuery">
    <complexType>
      <sequence>
        <element name="loginInfo" nillable="true" type="common:LoginInfo" />
        <element name="instanceId" type="string" />
        <element name="extensions" nillable="true" type="common:ExtensionList" />
      </sequence>
    </complexType>
  </element>
  <element name="GetSavedQuery">
    <complexType>
      <sequence>
        <element name="loginInfo" nillable="true" type="common:LoginInfo" />
        <element name="instanceId" type="string" />
        <element name="extensions" nillable="true" type="common:ExtensionList" />
      </sequence>
    </complexType>
  </element>
  <element name="GetSavedQueryOutput">
    <complexType>
      <sequence>
        <element name="savedQueryData" type="tns:SavedQueryData" />
        <element name="status" type="common:StatusList" />
        <element name="extensions" nillable="true" type="common:ExtensionList" />
      </sequence>
    </complexType>
  </element>
  <element name="ListSavedQueries">
    <complexType>
      <sequence>
        <element name="loginInfo" nillable="true" type="common:LoginInfo" />
        <element name="extensions" nillable="true" type="common:ExtensionList" />
      </sequence>
    </complexType>
  </element>
  <element name="ListSavedQueriesOutput">
    <complexType>
      <sequence>
        <element name="savedQueriesInfo" type="tns:SavedQueryInfoList" />
        <element name="status" type="common:StatusList" />
        <element name="extensions" nillable="true" type="common:ExtensionList" />
      </sequence>
    </complexType>
  </element>
</schema>